import request from '@/utils/request'


/**
 * @description: 获取计划单清单
 */
export function getPlanNOList(){
    return request({
        url: '/plan/order/plan/list',
        method: 'get',
    })
}

/**
 * @description: 获取单号
 */
export function getPlanNO() {
    return request({
        url: '/plan/order/planno',
        method: 'get',
    })
}


/**
 * @description: 添加计划单
 * @param {*} data
 */
export function addPlanOrder(data) {
    return request({
        url: '/plan/order/plan/add',
        method: 'post',
        data
    })
}

/**
 * @description: 获取计划单详情
 * @param {*} data
 */
export function getPlanDetail(params) {
    return request({
        url: '/plan/order/plan/detail',
        method: 'get',
        params
    })
}

/**
 * @description: 更新计划单
 * @param {*} data
 */
export function updatePlanOrder(data) {
    return request({
        url: '/plan/order/plan/update',
        method: 'post',
        data
    })
}


/**
 * @description: 审核、反审核计划单
 * @param {*} data
 */
export function auditPlanOrder(data){
    return request({
        url: '/plan/order/plan/audit',
        method: 'post',
        data
    })
}

/**
 * @description: 删除计划单
 * @param {*} data
 */
export function deletePlanOrder(data) {
    return request({
        url: '/plan/order/plan/delete',
        method: 'post',
        data
    })
}

/**
 * @description: 查询工单已排单的数量
 * @param {*} params
 */
export  function getPlanOrderAlreadyQuantity(params) {
    return request({
        url: '/plan/order/already/quantity',
        method: 'get',
        params
    })
}